﻿@{
    Layout = null;
}
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html> 
<head> 
    <title>Index</title>
         @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )
    
    <script type="text/javascript">
        function OK() {

            lpModal.Show();
            var codeNo = comboBox.GetValue();
            var codeNoT = comboBox.GetText();
            if (pd(codeNo)) {
                $.ajax({
                    type: 'POST',
                    url: rootPath + '/GSImportDate/GompareImportDateSave',
                    data: { nsrdzdah: codeNo, nsrsbh: $("#hdNSRSBH").val(), bsrmc: $("#hdNSRMC").val(), xx: codeNoT },
                    success: function (result) {
                        lpModal.Hide();
                        if (result == "exists") {
                            tbCodeNo.SetErrorText("编码已存在");
                            tbCodeNo.SetIsValid(false);
                        } else if (result == "ok") {
                            parent.codeOK();
                        } else if (result == "error") {
                            alert("保存失败");
                        }
                    }
                });
            } else {
                lpModal.Hide();
            }
        }


        function pd(codeName) {
            var bl = true;
            if (null == codeName || ASPxClientUtils.Trim(codeName) == "") {
                FUpLevelAmount.SetErrorText("请选择纳税人");
                FUpLevelAmount.SetIsValid(false);
                bl = false;
            }
            return bl;
        }

    </script>

</head>
<body>
    <div>

    <table class="tableFrom">
        <tr>
            <th style=" width:150">
                纳税人识别号:</th>
            <td>
               @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "NSRSBH";
                   settings.Width = 200;
                   settings.Text = ViewData["NSRSBH"].ToString();
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   settings.Enabled = false;
               }).GetHtml()
            </td>
        </tr>
                <tr>
            <th style=" width:150">
                纳税人名称:</th>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "NSRMC";
                   settings.Width = 200;
                   settings.Text = ViewData["NSRMC"].ToString();
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
                   settings.Enabled = false;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <th style=" width:150">
               修改后纳税人:</th>
            <td>
                @Html.Partial("LargeDataComboBoxPartial")
            </td>
        </tr>
   </table>

                
    <script>
        lp.Hide();
    </script>
         @Html.Hidden("hdNSRMC", (ViewData["NSRMC"]))
         @Html.Hidden("hdNSRSBH", ViewData["NSRSBH"])
         

    </div>
</body>
</html>
